Unit ArizaAciklamaGiris;

Interface

Uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, Wwdbigrd, Wwdbgrid, DB, ADODB, StdCtrls, Buttons,
  ExtCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb, siComp;

Type
  TArizaAciklamaGirisF = Class(TForm)
    ArizaAciklamaQ: TADOQuery;
    ArizaAciklamaQS: TDataSource;
    wwDBGrid1: TwwDBGrid;
    Panel3: TPanel;
    bkaydet: TBitBtn;
    bvazgec: TBitBtn;
    bkapat: TBitBtn;
    Panel1: TPanel;
    Label1: TLabel;
    arizaturuk: TwwDBComboBox;
    Procedure FormClose(Sender: TObject; Var Action: TCloseAction);
    Procedure bkapatClick(Sender: TObject);
    Procedure bkaydetClick(Sender: TObject);
    Procedure bvazgecClick(Sender: TObject);
    Procedure FormKeyPress(Sender: TObject; Var Key: Char);
    Procedure FormShow(Sender: TObject);
    Procedure arizaturukChange(Sender: TObject);
    Procedure ArizaAciklamaQBeforePost(DataSet: TDataSet);
  Private
    { Private declarations }
  Public
    { Public declarations }
  End;

Var
  ArizaAciklamaGirisF: TArizaAciklamaGirisF;

Implementation

Uses data, ana1;

{$R *.dfm}

Procedure TArizaAciklamaGirisF.FormClose(Sender: TObject;
  Var Action: TCloseAction);
Begin
  ArizaAciklamaQ.Close;

  Action := CaFree;
  ArizaAciklamaGirisF := Nil;
End;

Procedure TArizaAciklamaGirisF.bkapatClick(Sender: TObject);
Begin
  close;
End;

Procedure TArizaAciklamaGirisF.bkaydetClick(Sender: TObject);
Begin
  ArizaAciklamaQ.UpdateBatch();
  close;
End;

Procedure TArizaAciklamaGirisF.bvazgecClick(Sender: TObject);
Begin
  ArizaAciklamaQ.CancelBatch();
End;

Procedure TArizaAciklamaGirisF.FormKeyPress(Sender: TObject;
  Var Key: Char);
Begin
  If key = #27 Then
    close;
End;

Procedure TArizaAciklamaGirisF.FormShow(Sender: TObject);
Begin
  arizaturuk.ItemIndex := 0;

  ArizaAciklamaQ.Close;
  ArizaAciklamaQ.Open;
End;

Procedure TArizaAciklamaGirisF.arizaturukChange(Sender: TObject);
Begin
  If arizaturuk.text = '' Then
  Begin
    arizaturuk.ItemIndex := 0;
  End;

  ArizaAciklamaQ.close;
  ArizaAciklamaQ.SQL.text := 'select * from Ariza_Aciklama where tip=' + arizaturuk.value + ' order by aciklama';
  ArizaAciklamaQ.open;
End;

Procedure TArizaAciklamaGirisF.ArizaAciklamaQBeforePost(DataSet: TDataSet);
Begin
  ArizaAciklamaQ.FieldByName('tip').asinteger := strtoint(arizaturuk.value);
End;

End.